import Home from '../views/home/Home.vue'
import Center from '../views/center/Center.vue'
import BlogList from '../views/blog-manage/BlogList.vue'
import BlogAdd from '../views/blog-manage/BlogAdd.vue'
import BlogEdit from '../views/blog-manage/BlogEdit.vue'
import UserAdd from '../views/user-manage/UserAdd.vue'
import UserList from '../views/user-manage/UserList.vue'
import ProjectAdd from '../views/project-manage/ProjectAdd.vue'
import ProjectList from '../views/project-manage/ProjectList.vue'
import ProjectEdit from '../views/project-manage/ProjectEdit.vue'
import NotFound from '../views/notfound/NotFound.vue'
const routes = [
  {
    path: '/index',
    component: Home
  },
  {
    path: '/center',
    component: Center
  },
  {
    path:'/blog-manage/bloglist',
    component: BlogList
  },
  {
    path:'/blog-manage/blogadd',
    component:BlogAdd
  },
  {
    path:'/blog-manage/blogedit/:id',
    component: BlogEdit
  },
  {
    path:'/user-manage/useradd',
    component:UserAdd,
    admin: true
  },
  {
    path:'/user-manage/userlist',
    component:UserList,
    admin: true
  },
  {
    path:'/project-manage/projectadd',
    component:ProjectAdd
  },
  {
    path:'/project-manage/projectlist',
    component:ProjectList
  },
  {
    path:'/project-manage/projectedit/:id',
    component:ProjectEdit
  },
  {
    path:'/',
    redirect: '/index'
  },
  {
    path: '/:pathMatch(.*)*',
    name: 'NotFound',
    component: NotFound
  }
]
export default routes